﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace nyxwin.Data.Discussions
{
	public class DiscussionQuery
	{
		public const string Newest = "newest";
		public const string Newer = "newer";
		public const string Older = "older";

		public int DiscussionId { get; private set; }
		public int? LastEntryId { get; set; }
		public int? FirstEntryId { get; set; }
		public string Direction { get; private set; }
		
		public string FilterUser { get; set; }
		public bool IsFilterUser
		{
			get
			{
				return !string.IsNullOrEmpty(this.FilterUser);
			}
		}

		public string FilterContents { get; set; }
		public bool IsFilterContents
		{
			get
			{
				return !string.IsNullOrEmpty(this.FilterContents);
			}
		}

		public bool NeedRefresh { get; set; }

        public DiscussionQuery(int discussionId, string direction)
        {
            this.DiscussionId = discussionId;
            this.Direction = direction;

            this.FilterUser = string.Empty;
            this.FilterContents = string.Empty;
        }
	}
}
